package org.xukai.common.util;

import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;

/**
 * @author xukai
 * @desc
 * @date 2017-02-09-下午 2:41
 */
public class IOUtil {

    public static void main(String[] args) throws IOException, IllegalAccessException, InstantiationException {
        Path initPath = Paths.get("F:\\家庭组分享\\zookeep");
        Files.walkFileTree(initPath, new SimpleFileVisitor<Path>() {
            @Override
            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
                    throws IOException {
                System.out.println(file.getFileName().toString());
                return FileVisitResult.CONTINUE;
            }

        });
        IOUtil ioUtil = IOUtil.class.newInstance();
    }

}
